from django.db import models


class Cart(models.Model):
    user = models.ForeignKey(
        'user.User', on_delete=models.CASCADE, related_name='cart')
    book = models.ForeignKey(
        'book.Book', on_delete=models.CASCADE, related_name='cart')
    paid = models.BooleanField(default=False)
    created_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'cart'
